package com.moli.iov.admin.service.impl;

import com.moli.iov.admin.service.ITerminalInstallationAuditService;
import com.moli.iov.base.model.dto.req.QueryTerminalInstallationAuditListParamDto;
import com.moli.iov.base.model.dto.req.QueryVehicleTboxListParamDto;
import com.moli.iov.base.model.dto.req.TerminalBindingDeleteDto;
import com.moli.iov.base.model.dto.req.TerminalBindingSaveDto;
import com.moli.iov.base.model.dto.req.TerminalInstallLogsReqDto;
import com.moli.iov.base.model.dto.req.TerminalInstallationAuditReqDto;
import com.moli.iov.base.model.dto.res.TerminalInstallationAuditResDto;
import com.moli.iov.base.model.dto.res.VehicleTboxBindingResDto;
import com.moli.iov.base.model.mongo.TerminalInstallLogs;
import com.moli.iov.base.remote.ITerminalInstallationAuditRemoteService;
import com.moli.iov.base.remote.IVehicleTboxRemoteService;
import com.moli.iov.model.dto.req.PageExtend;
import com.moli.iov.rest.RestResponse;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Service;

/**
 * @author whl
 */
@Service
public class ITerminalInstallationAuditServiceImpl implements ITerminalInstallationAuditService {
    @Reference(group = "${service.group}", check = false)
    private IVehicleTboxRemoteService iVehicleTboxRemoteService;
    @Reference(group = "${service.group}", check = false)
    private ITerminalInstallationAuditRemoteService auditRemoteService;

    @Override
    public RestResponse  <PageExtend<VehicleTboxBindingResDto>> listVehicleTboxBinding(QueryVehicleTboxListParamDto dto) {
        return iVehicleTboxRemoteService.listVehicleTboxBinding(dto);
    }

    @Override
    public RestResponse listVehicleTboxBindingSave(TerminalBindingSaveDto dto) {
        return iVehicleTboxRemoteService.listVehicleTboxBindingSave(dto);
    }

    @Override
    public RestResponse<PageExtend<TerminalInstallationAuditResDto>> listTerminalInstallationAudit(QueryTerminalInstallationAuditListParamDto dto) {
        return auditRemoteService.listTerminalInstallationAudit(dto);
    }

    @Override
    public RestResponse audit(TerminalInstallationAuditReqDto dto) {
        return auditRemoteService.audit(dto);
    }

    /**
     * 安装日志列表
     * @param dto
     * @return
     */
    @Override
    public RestResponse<PageExtend<TerminalInstallLogs>> listTerminalInstallLogs(TerminalInstallLogsReqDto dto) {
        return auditRemoteService.listTerminalInstallLogs(dto);
    }

    @Override
    public RestResponse listVehicleTboxBindingDelete(TerminalBindingDeleteDto dto) {
        return iVehicleTboxRemoteService.listVehicleTboxBindingDelete(dto);
    }
}
